package routers

import (
	"merge_Web/controllers"

	beego "github.com/beego/beego/v2/server/web"
)

func init() {
	// beego.Router("/", &controllers.MainController{})
	beego.Router("/", &controllers.LoginController{})
	beego.Router("/Register", &controllers.LoginController{}, "post:Register")
	beego.Router("/Login", &controllers.LoginController{}, "post:Login")
	beego.Router("/LoginConfirm", &controllers.LoginController{}, "get:LoginConfirm")
	beego.Router("/RenewEmail", &controllers.LoginController{}, "get:RenewEmail")
	beego.Router("/RenewAnnounce", &controllers.LoginController{}, "get:RenewAnnounce")
	beego.Router("/SaveVersion", &controllers.LoginController{}, "post:SaveVersion")

	beego.Router("/LoadConfig", &controllers.LoginController{}, "post:LoadConfig")
	beego.Router("/AddEmailUser", &controllers.LoginController{}, "post:AddEmailUser")
	beego.Router("/SendEmail", &controllers.LoginController{}, "post:SendEmail")

	beego.Router("/api/getPlayerInfo", &controllers.PlayerController{}, "post:GetPlayerInfo")
	beego.Router("/api/findPlayerInfo", &controllers.PlayerController{}, "post:FindPlayerInfo")
	beego.Router("/api/GetPlayerInfoById", &controllers.PlayerController{}, "post:GetPlayerInfoById")
	beego.Router("/api/RegisterPlayerUin", &controllers.PlayerController{}, "post:RegisterPlayerUin")
	beego.Router("/api/ReqAllAddFriendInfo", &controllers.PlayerController{}, "post:ReqAllAddFriendInfo")
	beego.Router("/api/ReqAddFriendData", &controllers.PlayerController{}, "post:ReqAddFriendData")

	beego.Router("/api/ReadConfig", &controllers.ReadCfgController{}, "post:ReadConfig")

	beego.Router("/api/Android/getGameBuildCode", &controllers.ThirdController{}, "get:GetAndroidVersion")
	beego.Router("/api/IOS/getGameBuildCode", &controllers.ThirdController{}, "get:GetIOSVersion")
	// fmt.Println(beego.AppConfig.String("mysqlpass"))
	// fmt.Println(beego.AppConfig.String("mysqluser"))
	// fmt.Println(beego.BConfig.WebConfig.AutoRender)
}
